﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;

namespace RazorPagesMovie.Models
{
    public class Movie
    {
        public int ID { get; set; }

        [Required, StringLength(50,MinimumLength =3)]
        public string Title { get; set; }

        [Display(Name = "Release Data")]
        [DataType( DataType.Date)]
        public DateTime ReleaseDate { get; set; }

        [Range(1,100)]
        [DataType(DataType.Currency)]
        public decimal Price { get; set; }

        [Required, StringLength(30), RegularExpression(@"^[A-Z]+[a-zA-Z""'\s-]*%")]
        public string Genre { get; set; }
        [Required, StringLength(5), RegularExpression(@"^[A-Z]+[a-zA-Z""'\s-]*%")]
        public string Rating { get; set; }
    }
}
